﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/MainContent.Master" Inherits="System.Web.Mvc.ViewPage<Fao.Web.Models.ExtendEquipmentType>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Edit
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<%=Html.Partial("ETTree",ViewData["equipmenttypes"]) %>
<div id="rightBox">

    <h2>Edit</h2>
    <% Html.EnableClientValidation(); %>
    <% using (Html.BeginForm()) {%>
        <%: Html.ValidationSummary(true) %>
        
        <fieldset>
            <legend>Fields</legend>
            
             <div class="editor-label">
                <%: Html.LabelFor(model => model.ExtendPropertyType) %>
            </div>
            <div class="editor-field">
            <b>
                <%: Html.DisplayFor(model => model.ExtendPropertyType)%></b>
                <%: Html.ValidationMessageFor(model => model.ExtendPropertyType) %>
            </div>         
            
            <div class="editor-label">
                <%: Html.LabelFor(model => model.Field) %>
            </div>
            <div class="editor-field">
                <%: Html.TextBoxFor(model => model.Field, new { disabled = "disabled" })%>
                <%: Html.ValidationMessageFor(model => model.Field) %>
            </div>
            
            <div class="editor-label">
                <%: Html.LabelFor(model => model.FieldName) %>
            </div>
            <div class="editor-field">
                <%: Html.TextBoxFor(model => model.FieldName) %>
                <%: Html.ValidationMessageFor(model => model.FieldName) %>
            </div>            
            <div class="editor-label">
                <%: Html.LabelFor(model => model.IsNull) %>
            </div>
            <div class="editor-field">
                <%: Html.EditorFor(model => model.IsNull)%>
                <%: Html.ValidationMessageFor(model => model.IsNull) %>
            </div>
            
           
           
            <% if (Model.ExtendPropType == Fao.Web.Models.ExtendPropType.单选 || Model.ExtendPropType == Fao.Web.Models.ExtendPropType.多选)
             { %>
            <div class="editor-label">
                <%: Html.LabelFor(model => model.InitValues)%>
            </div>
            <div class="editor-field">
                <%: Html.TextArea("InitValues",Model.InitValues)%>              
                 请输入选项，1行表示一个选项，如果为空，则转换为单行文本类型。
            </div>
            
            <%} %>
            
            <p>
                <input type="submit" value="保存" />
            </p>
        </fieldset>

    <% } %>
 </div>
</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="cphMeta" runat="server">
</asp:Content>

<asp:Content ID="Content4" ContentPlaceHolderID="cphFooter" runat="server">
</asp:Content>

